/* 
 * File:   ContextMemento.cpp
 * Author: Gab'z
 * 
 * Created on 2 juin 2012, 19:06
 */

#include "ContextMemento.h"
#include "../command/UndoableRedoableCommand.h"

namespace calculator {

    ContextMemento::ContextMemento(
            UndoableRedoableCommand* undoableRedoableCommand,
            const Parameters* parameters,
            const StackList* stackList,
            const unsigned int currentStackIndex) :
    Memento(undoableRedoableCommand),
    _parameters(parameters),
    _stackList(stackList),
    _currentStackIndex(currentStackIndex) {
    }

    ContextMemento::ContextMemento(const ContextMemento& memento) :
    Memento(memento._undoableRedoableCommand),
    _parameters(memento._parameters),
    _stackList(memento._stackList),
    _currentStackIndex(memento._currentStackIndex) {
    }

    ContextMemento::~ContextMemento() {
        delete _parameters;
        delete _stackList;
    }
}
